import * as message from './message.js'
import './message.vue'

let installOptions = {}
const warn = (content) => {
  return message.warn(Object.assign({}, installOptions, {
    message: content
  }))
}
const success = (content) => {
  return message.success(Object.assign({}, installOptions, {
    message: content
  }))
}
const error = (content) => {
  return message.error(Object.assign({}, installOptions, {
    message: content
  }))
}
export const install = (Vue, options) => {
  installOptions = options
  Vue.prototype.$warn = warn
  Vue.prototype.$success = success
  Vue.prototype.$error = error
}

export default {
  install,
  warn,
  success,
  error
}
